home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / packet / praf205e / stream.doc < prev    next >
Text File  |  1995-04-01  |  2KB  |  66 lines

  1. STREAM protocol
  2. ---------------
  3.  
  4. This is a high speed binary transfer protocol.  No acks are made.
  5.  
  6. Packet format:
  7. --------------
  8.  
  9. If the high order two bits in the length are both one then the block
  10. is an information block.  CRC are 16-bit cyclic-redundancy-check using
  11. CCITT standard.  All bytes are included,
  12.  
  13.     End-of-file
  14.            Length       -- 2 bytes     ** both are ZERO **
  15.            Block number -- 1 byte
  16.  
  17.     Normal
  18.  
  19.            Length       -- 2 bytes     ** Max 49151
  20.            Block number -- 1 byte
  21.            Data         -- variable
  22.            CRC          -- 2 bytes
  23.  
  24.     Information block
  25.            Block type   -- 1 byte      Range $C0 - $FF
  26.            Length       -- 1 byte
  27.            Block number -- 1 byte
  28.            Data         -- variable
  29.            CRC          -- 2 bytes
  30.  
  31.  
  32. Field descriptors:
  33. ------------------
  34.  
  35. Length -- Length of the block including all headers/trailers.  The
  36.           exception to this is the EOF marker
  37.  
  38. Block number -- Incremented block number for all blocks starting with ZERO.
  39.           After 255 wrap back to zero.  This is in all blocks including the
  40.           EOF marker
  41.  
  42. Data   -- Any data.
  43.  
  44. CRC    -- CRC are 16-bit cyclic-redundancy-check using CCITT standard.
  45.           All bytes are included,
  46.  
  47. All information is transmitted in NETWORK BYTE ORDER.  High order byte
  48. is first.  This is the REVERSE of the INTEL 8088 chip.
  49.  
  50.  
  51.  
  52. Data area for Information Block
  53. -------------------------------
  54.  
  55. File info -- High order byte of packet is $F0
  56.              Data area is formatted as one or more values
  57.                   type   -- 1 byte  -- value type
  58.                   length -- 1 byte  -- length of value
  59.                   value  -- n bytes -- actual value
  60.  
  61.              Value types
  62.                   0 -- Length of file -- 4 bytes long
  63.  
  64.  
  65.  
  66.